package hotciv.common;

import hotciv.framework.GameConstants;
import hotciv.framework.Position;
import hotciv.framework.Tile;
import hotciv.framework.TileMap;

public class CommonTileMap implements TileMap {
	private Tile ocean, hill, mountain;
	public CommonTileMap() {
		ocean = new TileImpl( new Position(1, 0), GameConstants.OCEANS);
		hill = new TileImpl( new Position(0, 1), GameConstants.HILLS);
		mountain = new TileImpl( new Position(2, 2), GameConstants.MOUNTAINS);
	}
	
	@Override
	public Tile getTileAt(Position p) {
		if (p.equals(ocean.getPosition())) return ocean;
		else if (p.equals(hill.getPosition())) return hill;
		else if (p.equals(mountain.getPosition())) return mountain;
		else return new TileImpl( p, GameConstants.PLAINS);
	}

}
